﻿<Window x:Class="MIBETerminal.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MIBETermina v0.1" Height="460" Width="793">
    <Grid>
        <Grid Name="grid1">
            <Grid.RowDefinitions>
                <RowDefinition MinHeight="23" Height="23*" MaxHeight="23" />
                <RowDefinition Height="34" MinHeight="34" MaxHeight="34" />
                <RowDefinition Height="300" />
                <RowDefinition Height="52*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition MinWidth="50" Width="258*" />
                <ColumnDefinition MinWidth="50" Width="513*" />
            </Grid.ColumnDefinitions>
            <Button Content="Button" Height="31" HorizontalAlignment="Left" Margin="6,1,0,0" Name="button1" VerticalAlignment="Top" Width="89" Grid.Row="3" />
            <RichTextBox HorizontalAlignment="Stretch" Name="terminalOutputTextBox" VerticalAlignment="Stretch" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" BorderThickness="1" Background="Black" Foreground="Lime" FontSize="16" Margin="0,0,0,6" Grid.Row="2" Grid.Column="1" HorizontalScrollBarVisibility="Auto" />
            <Menu Height="23" HorizontalAlignment="Stretch" Name="WindowMainMenu" VerticalAlignment="Top" Grid.ColumnSpan="2" Margin="0,0,144,0">
                <MenuItem Header="File">
                    <MenuItem Header="Quit" Name="QuitItem" Click="QuitItem_Click" />
                </MenuItem>
                <MenuItem Header="Edit" />
                <MenuItem Header="Help" />
            </Menu>
            <ToolBar MaxHeight="34" MinHeight="34" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0,0,0,300" Grid.Row="1">
                <Button Content="Cut" Command="ApplicationCommands.Cut" />
                <Button Content="Copy" Command="ApplicationCommands.Copy" />
                <Button Content="Paste" Command="ApplicationCommands.Paste"/>
                <Separator Margin="5" />
                <ComboBox Margin="2" Name="portNameComboBox" SelectedIndex="0" HorizontalContentAlignment="Stretch" Width="100" ItemsSource="{Binding}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Margin="5, 1" Fill="{Binding}" />
                                <TextBlock Grid.Column="1" Margin="5, 1" Text="{Binding}" />
                            </Grid>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <ComboBox Margin="2" Name="baudrateComboBox" SelectedIndex="0" HorizontalContentAlignment="Stretch" Width="70" ItemsSource="{Binding}" MinWidth="70" MaxWidth="60" Text="emptyText">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Margin="5, 1" Fill="{Binding}" />
                                <TextBlock Grid.Column="1" Margin="5, 1" Text="{Binding}" />
                            </Grid>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <ComboBox Margin="2" Name="parityComboBox" SelectedIndex="0" HorizontalContentAlignment="Stretch" Width="80" ItemsSource="{Binding}" MinWidth="80" MaxWidth="80" Text="emptyText">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Margin="5, 1" Fill="{Binding}" />
                                <TextBlock Grid.Column="1" Margin="5, 1" Text="{Binding}" />
                            </Grid>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <Separator Margin="5" />
                <Button Content="Connect" Name="connectButton" HorizontalAlignment="Right" HorizontalContentAlignment="Center" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="connectButton_Click">
                    <Button.Background>
                        <SolidColorBrush />
                    </Button.Background>
                </Button>
                <ToolBar.BorderBrush>
                    <SolidColorBrush />
                </ToolBar.BorderBrush>
            </ToolBar>
            <TextBox Name="terminalInput" Margin="0,0,0,32" Grid.Row="3" Grid.Column="1" KeyDown="terminalInput_KeyDown" />
            <DataGrid Grid.Row="2" HorizontalAlignment="Stretch" Name="dataGrid1" VerticalAlignment="Stretch" ItemsSource="{Binding Filters}" AutoGenerateColumns="True" CanUserResizeRows="False" CanUserAddRows="True" />
        </Grid>
    </Grid>
</Window>
